#ifndef xsane_ui_h
#define xsane_ui_h

gint xsane_scan_win_delete(GtkWidget *w, gpointer data);
GtkWidget *xsane_files_build_menu(void);
GtkWidget *xsane_preferences_build_menu(void);
GtkWidget *xsane_view_build_menu(void);
GtkWidget *xsane_window_build_menu(void);
GtkWidget *xsane_help_build_menu(void);
GtkWidget *xsane_build_main_window_left_pane();
GtkWidget *xsane_build_main_window_right_pane();
gint xsane_device_options_win_delete(GtkWidget *widget, gpointer data);
void xsane_panel_build();
void xsane_set_modus_defaults(void);
void xsane_scan_callback(void);
void xsane_show_histogram_callback(GtkWidget *widget);
void xsane_histogram_ignore_border_callback(GtkWidget *widget, gpointer data);
void xsane_histogram_clipping_margin_callback(GtkWidget *widget, gpointer data);
GtkWidget *xsane_update_xsane_callback();

void xsane_create_basic_adjustment_tools();
void xsane_update_basic_adjustment_tools();

void xsane_create_scan_mode_medium_box();
void xsane_update_scan_mode_medium_box();

void xsane_build_device_options();

void xsane_gamma_changed(GtkAdjustment *adj_data, double *val);
void xsane_threshold_changed(void);
void xsane_enhancement_rgb_default_callback(GtkWidget *widget);
void xsane_enhancement_negative_callback(GtkWidget *widget);
void xsane_auto_enhancement_callback(GtkWidget *widget);
void xsane_always_auto_enhance_callback(GtkWidget * widget);
void xsane_enhancement_type_callback(GtkWidget * widget, gpointer data);
void xsane_reset_free_gamma_callback(GtkWidget * widget, gpointer data);
void xsane_adf_pages_max_callback(GtkWidget *widget, gpointer data);
void xsane_modus_callback(GtkWidget *xsane_parent, int *num);
void xsane_save_image_type_callback(GtkWidget *widget, gpointer data);
void xsane_paper_orientation_callback(GtkWidget *widget, gpointer data);
void xsane_printer_callback(GtkWidget *widget, gpointer data);
void xsane_cms_function_menu_callback(GtkWidget *widget, gpointer data);
void xsane_scanmode_menu_callback(GtkWidget *widget, gpointer data);
void xsane_bit_depth_menu_callback(GtkWidget *widget, gpointer data);
gint xsane_medium_context_menu_callback(GtkWidget *widget, GdkEvent *event);
void xsane_set_medium_callback(GtkWidget *widget, gpointer data);
int xsane_resolution_widget_new(GtkWidget *parent, int well_known_option, double *resolution, const char *image_xpm[], const gchar *desc, const gchar *widget_name);
int xsane_zoom_widget_new(GtkWidget *parent);

#define XSANE_GTK_NAME_X_RESOLUTION "GtkMenuXResolution"
#define XSANE_GTK_NAME_RESOLUTION   "GtkMenuResolution"
#define XSANE_GTK_NAME_Y_RESOLUTION "GtkMenuYResolution"

#define XSANE_WIDGET_NAME_RANGE "xsane-range"
#define XSANE_WIDGET_NAME_SPINBUTTON "xsane-spinbutton"

#endif
